<!-- D:\project\app\ydz-app-uniapp\static\images\forum -->
<template>
	<view class="pagebody">
		<view class="topbox">
			<view class=" align-center">
				<view class=" flex-row align-center">
					<image @click="backpage" src="@/static/images/login/leftjt.png" alt=""
						style="width: 48rpx;height: 48rpx;"></image>
				</view>
				<view class="color303b39 fz40 fwbold" style="margin-left: 263rpx;">
					评论
				</view>
			</view>
		</view>

		<view class="box">
			<view class="card justify-between" @click="todetail(item)" v-for="(item,index) in replylist" :key="index">
				<view class="" style="width: 580rpx;">
					<view class="flex-row">
						<img :src="baseUrl+item.user.avatar" style="margin-right: 16rpx;width: 68rpx;height: 68rpx;border-radius: 50%;flex-shrink: 0;" >
						<view class="">
							<view class="flex-row align-center">
								<span class="mr16" style="color: #303B39;font-size: 32rpx;font-weight: 800;">{{item.user.nickName}}</span> <span class="fz24" style="color: #7E8987;">{{item.createTime.slice(0,10)}}</span>
							</view>
							<view class="" style="color: #303B39;line-height: 48rpx;font-size: 28rpx;">
							 <span style="color: #576260;">{{item.pid?'回复':'评论'}}了你:</span>	{{item.replyContent}}
							</view>
						</view>
						
					</view>

				</view>
				<view class="" style="width: 106rpx;">
					<view v-if="item.attachFiles!=null&&item.attachFiles.length>0" class="imgbox "
						:style="{ background: 'url(' + item.attachFiles[0].url + ') no-repeat' }">
					</view>
<!-- 					<view v-else class="justify-center br16 align-center fz28 fwbold" style="color: #A4AFAD; width: 106rpx;height: 106rpx; background: #F0F6F5;">
						暂无
					</view> -->
				</view>
				
			</view>
		</view>
	</view>
</template>

<script>
	import {
		getOwnerReply,
		invlike,
		getDicts,
		invcollectAdd,
		delInvitation
	} from '@/api/api.js'
	import config from '@/config'
	import FixedFoot from '../../layouts/fixedfoot.vue';
	export default {
		components: {
			FixedFoot,
		},
		onLoad() {

		},
		data() {
			return {
				replylist:[],
				baseUrl:config.baseUrl,
			}
		},
		created() {
			this.getreplylist()
		},
		mounted() {
		},


		methods: {
			backpage(){
				uni.navigateBack({
					delta: 1
				});
			},
			getreplylist() {
				getOwnerReply().then(response => {
					this.replylist = response.data
				})
			},
			todetail(item) {
				uni.navigateTo({
					url: '/pages/forum/forumdetail?id=' + item.invitationId
				})
			},


		},

	}
</script>

<style lang="scss" scoped>
	.pagebody {
		padding-bottom: 136rpx;
		background: #fff;
		.topbox {
			height: 88rpx;
			background: #fff;
			padding: 20rpx 24rpx;
		}
		.box{
			padding: 0 24rpx;
			.card{
				margin-top: 56rpx;
				.imgbox{
					height: 106rpx;
					width: 106rpx;
					background-size: cover !important;
					border-radius: 16rpx;
					background-position: center !important;
				}
			}
		}

	}
</style>